<template>
	<view>
		<view class="news_item" v-for="item in list" :key="item.faqId">
			<view class="right">
				<view class="tit">
					<text>问：{{item.faqContent}}</text>
				</view>
				<view class="info">
					<text>答：{{item.faqAnswer}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data() {
			return {
				list:[],
			}
		},
		mounted() {
			this.getFaqList()
		},
		methods:{
			getFaqList(){
				uni.request({
				    url: `http://localhost:7000/customer/customer/getFaqList`, //接口地址。
					method:'POST',
				    success: (res) => {
						this.list = res.data.data
				        console.log(res.data)
				    }
				});
			}
		}
	}
</script>

<style lang="scss">
	.news_item {
		display: flex;
		padding: 10rpx 20rpx;
		border-bottom: 1rpx solid grigio;
		// image{
		// 	min-width: 200rpx;
		// 	max-width: 200rpx;
		// 	height: 150rpx;
		// }
		.right{
			margin-bottom: 30rpx;
			margin-left: 15rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			.tit{
				font-size: 30rpx;
			}
			.info{
				font-size: 20rpx;
				// text:nth-child(2){
				// 	margin-left: 30rpx;
				// }
			}
		}
	}
</style>
